import { Component, OnInit } from '@angular/core';
import {ActivatedRoute, Router} from "@angular/router";

@Component({
  selector: 'app-maintenance-home',
  templateUrl: './maintenance-home.component.html',
  styleUrls: ['./maintenance-home.component.css']
})
export class MaintenanceHomeComponent implements OnInit {
  userId: string = this.routerInfo.snapshot.queryParams['userId'];
  constructor(private routerInfo: ActivatedRoute,
              private router: Router) { }

  ngOnInit() {
  }

  addType() {
    this.router.navigate(['maintenance', 'new'], {queryParams: {userId: this.userId}});
  }

}
